
JZ11
/**
 *
 * @param rotateArray int整型一维数组
 * @param rotateArrayLen int rotateArray数组长度
 * @return int整型
 */


int minNumberInRotateArray(int* rotateArray, int rotateArrayLen ) {
    // write code here
    int left = 0;
    int right = rotateArrayLen - 1;
    int mid = 0;
    while (left < right)
    {
        mid = left + (right - left) / 2;
        if (rotateArray[mid] > rotateArray[right])
        {
            left = mid + 1;
        }
        else if (rotateArray[mid] < rotateArray[right]) 
        {
            right = mid;
        } 
        else
            right--;

    }
    return rotateArray[left];
}